<?

if ($c = stack('name')) {

	// get current date
	$DATA['today'] = parse_today();
	
	if (!($dt = param('date')) || !($dt = parse_date($dt)) ) 		// get date from param (y2k-YY-MM-DD) if correct, elsewere get current date
		$dt = $DATA['today'];
	
	$DATA['date'] = $dt;


	$DATA['components'][$c]['data'] = array('date' => $dt);
	
	unstack();
}

?>